<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>新增权限组</title>
		<link rel="stylesheet" href="/assets/layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="/assets/plugins/editor.md/css/editormd.min.css" />
	</head>
	<body>
		<div class="admin-main">
			<form class="layui-form" action="/api/article/add" style="margin-top: 20px;">
				<div class="layui-form-item" style="width: 600px;">
					<label class="layui-form-label">文章标题</label>
					<div class="layui-input-block">
						<input type="text" name="title" placeholder="权限组名称" lay-verify="required" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" style="width: 600px;">
					<label class="layui-form-label">文章分类</label>
					<div class="layui-input-block">
						<select name="categoryId" asnycSelect="/api/article/category/options">
							<option value="">选择分类</option>
						</select>
					</div>
				</div>
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">文章摘要</label>
					<div class="layui-input-block">
						<textarea name="summary" placeholder="文章摘要" class="layui-textarea"></textarea>
					</div>
				</div>
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">文章内容</label>
					<div class="layui-input-block" id="editormd">
						<textarea style="display:none;" name="content"></textarea>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<input type="button" class="layui-btn layui-btn-normal J_ajaxSubmit" value="保存" />
						<input type="reset" class="layui-btn layui-btn-primary" value="重置" />
					</div>
				</div>
			</form>
		</div>
	</body>
	<script type="text/javascript" src="/assets/layui/layui.js"></script>
	<script src="./cms.js"></script>
	<!-- <script src="http://cdn.staticfile.org/jquery/2.1.4/jquery.min.js"></script> -->
	<script src="https://cdn.staticfile.org/zepto/1.2.0/zepto.min.js"></script>
	<script src="/assets/plugins/editor.md/editormd.min.js"></script>
	<script>
		var pageType = "article-add";
		var testEditor;
		$(function() {
			testEditor = editormd("editormd", {
				width: "98%",
				height: 540,
				syncScrolling: "single",
				toolbarIcons: function() {
					return editormd.toolbarModes['simple'];
				},
				path: "/assets/plugins/editor.md/lib/",
				codeFold: false,
				searchReplace: true,
				saveHTMLToTextarea: false,
				emoji: true,
				taskList: false,
				tocm: false,
				tex: false,
				previewCodeHighlight: false,
				flowChart: false,
				sequenceDiagram: false
			});
		});
	</script>
</html>
